#include<iostream>
using namespace std;
int n;
bool st[1010];
int prime[1010];
int main()
{
	cin >> n;
	int cnt = 0;
	for (int i = 2; i <= n; i++) {
		if (!st[i]) {
			prime[++cnt] = i;
			for (int j = i * 2; j <= n; j += i) {
				st[j] = 1;
			}
		}
	}
	for (int i = 1; i <= cnt; i++) {
		if (n % prime[i] == 0) {
			cout << prime[i] << " " << n / prime[i] << endl;
			return 0;
		}
	}
	return 0;
}